package com.gadgets.framework.common.repository;

import com.gadgets.framework.common.pojo.Sequeuce;
import com.gadgets.framework.sequeuce.dto.SequeuceQueryDTO;
import com.gadgets.framework.sequeuce.dto.SequeuceResetDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-09-19
 * 
 */
@Mapper
@Repository
public interface ISequeue {

    /**
     * 从指定序列中获取序列值
     * @param sequeueName   序列名
     * @return              序列值
     */
    public int getSequeueNoFromAim(@Param(value = "seqName") String sequeueName);

    /**
     * 查询序列信息
     * @param queryDTO      查询条件
     * @return              查询结果
     */
    public List<Sequeuce> selectSequeuceInfo(@Param(value = "queryDto") SequeuceQueryDTO queryDTO);

    /**
     * 重置序列
     * @param resetDTO
     * @return
     */
    public int resetSequeuce(@Param(value = "resetDto") SequeuceResetDTO resetDTO);

}
